home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / clarion / cw15 / tpw15.z / WFIELD.TPW < prev    next >
Text File  |  1995-08-31  |  18KB  |  470 lines

  1. #!--------------------------------------------------------------------------
  2. #GROUP(%QuickDeclareFields)
  3. #!Buttons
  4. #DECLARE(%ButtonControlID,%ProcedureList),MULTI
  5. #DECLARE(%ButtonControl,%ButtonControlID)
  6. #DECLARE(%ButtonAction,%ButtonControlID)
  7. #DECLARE(%ButtonRunName,%ButtonControlID)
  8. #DECLARE(%ButtonRunParameters,%ButtonControlID)
  9. #DECLARE(%ButtonProcedure,%ButtonControlID)
  10. #DECLARE(%ButtonThread,%ButtonControlID)
  11. #DECLARE(%ButtonThreadStack,%ButtonControlID)
  12. #DECLARE(%ButtonParameters,%ButtonControlID)
  13. #DECLARE(%ButtonRequest,%ButtonControlID)
  14. #!------------------------------------------------------------------------------
  15. #!Entry
  16. #DECLARE(%EntryControlID,%ProcedureList),MULTI
  17. #DECLARE(%EntryControl,%EntryControlID)
  18. #DECLARE(%PreLookupKey,%EntryControlID)
  19. #DECLARE(%PreLookupField,%EntryControlID)
  20. #DECLARE(%PreLookupProcedure,%EntryControlID)
  21. #DECLARE(%PostLookupKey,%EntryControlID)
  22. #DECLARE(%PostLookupField,%EntryControlID)
  23. #DECLARE(%PostLookupProcedure,%EntryControlID)
  24. #DECLARE(%ForceWindowRefresh,%EntryControlID)
  25. #!--------------------------------------------------------------------------
  26. #GROUP(%GenerateFieldPrompts)
  27. #SET(%ValueConstruct,ITEMS(%ButtonControlID))
  28. %%ButtonAction DEPEND %%Control STRING TIMES %ValueConstruct
  29. #FOR(%ButtonControlID)
  30. WHEN  ('%ButtonControl') ('%ButtonAction')
  31. #ENDFOR
  32.  
  33. %%ButtonRunName DEPEND %%Control STRING TIMES %ValueConstruct
  34. #FOR(%ButtonControlID)
  35. WHEN  ('%ButtonControl') ('%ButtonRunName')
  36. #ENDFOR
  37.  
  38. %%ButtonRunParameters DEPEND %%Control STRING TIMES %ValueConstruct
  39. #FOR(%ButtonControlID)
  40. WHEN  ('%ButtonControl') ('%ButtonRunParameters')
  41. #ENDFOR
  42.  
  43. %%ButtonProcedure DEPEND %%Control PROCEDURE TIMES %ValueConstruct
  44. #FOR(%ButtonControlID)
  45. WHEN  ('%ButtonControl') (%ButtonProcedure)
  46. #ENDFOR
  47.  
  48. %%ButtonThread DEPEND %%Control LONG TIMES %ValueConstruct
  49. #FOR(%ButtonControlID)
  50. WHEN  ('%ButtonControl') (%ButtonThread)
  51. #ENDFOR
  52.  
  53. %%ButtonThreadStack DEPEND %%Control @n7 TIMES %ValueConstruct
  54. #FOR(%ButtonControlID)
  55. WHEN  ('%ButtonControl') (%ButtonThreadStack)
  56. #ENDFOR
  57.  
  58. %%ButtonParameters DEPEND %%Control STRING TIMES %ValueConstruct
  59. #FOR(%ButtonControlID)
  60. WHEN  ('%ButtonControl') ('%ButtonParameters')
  61. #ENDFOR
  62.  
  63. %%ButtonRequest DEPEND %%Control STRING TIMES %ValueConstruct
  64. #FOR(%ButtonControlID)
  65. WHEN  ('%ButtonControl') ('%ButtonRequest')
  66. #ENDFOR
  67.  
  68. #SET(%ValueConstruct,ITEMS(%EntryControlID))
  69. %%PreLookupKey DEPEND %%Control KEY TIMES %ValueConstruct
  70. #FOR(%EntryControlID)
  71. WHEN  ('?%EntryControl') (%PreLookupKey)
  72. #ENDFOR
  73.  
  74. %%PreLookupField DEPEND %%Control COMPONENT TIMES %ValueConstruct
  75. #FOR(%EntryControlID)
  76. WHEN  ('?%EntryControl') (%PreLookupField)
  77. #ENDFOR
  78.  
  79. %%PreLookupProcedure DEPEND %%Control PROCEDURE TIMES %ValueConstruct
  80. #FOR(%EntryControlID)
  81. WHEN  ('?%EntryControl') (%PreLookupProcedure)
  82. #ENDFOR
  83.  
  84. %%PostLookupKey DEPEND %%Control KEY TIMES %ValueConstruct
  85. #FOR(%EntryControlID)
  86. WHEN  ('?%EntryControl') (%PostLookupKey)
  87. #ENDFOR
  88.  
  89. %%PostLookupField DEPEND %%Control COMPONENT TIMES %ValueConstruct
  90. #FOR(%EntryControlID)
  91. WHEN  ('?%EntryControl') (%PostLookupField)
  92. #ENDFOR
  93.  
  94. %%PostLookupProcedure DEPEND %%Control PROCEDURE TIMES %ValueConstruct
  95. #FOR(%EntryControlID)
  96. WHEN  ('?%EntryControl') (%PostLookupProcedure)
  97. #ENDFOR
  98.  
  99. %%ForceWindowRefresh DEPEND %%Control LONG TIMES %ValueConstruct
  100. #FOR(%EntryControlID)
  101. WHEN  ('?%EntryControl') (%ForceWindowRefresh)
  102. #ENDFOR
  103. #!--------------------------------------------------------------------------
  104. #GROUP(%AccumulateFieldList,%CurrentFile)
  105. #!--------------------------
  106. #DECLARE(%QControlType)
  107. #DECLARE(%QPicture)
  108. #DECLARE(%QControlText)
  109. #DECLARE(%CurrentRadioX)
  110. #DECLARE(%CurrentRadioY)
  111. #DECLARE(%CurrentRadioRow)
  112. #DECLARE(%MaximumRadioRows)
  113. #DECLARE(%ControlCheckColumn)
  114. #DECLARE(%CheckColumnsPossible)
  115. #DECLARE(%LastControlCheckColumn)
  116. #!--------------------------
  117. #FIX(%File,%CurrentFile)
  118. #SET(%FileListPromptWidth,%DefaultPromptWidth)
  119. #FOR(%Field),WHERE(NOT EXTRACT(%FieldQuickOptions,'NOPOPULATE'))
  120.   #MESSAGE('Collecting Field Information: ' & %Field,3)
  121.   #CASE(%FieldType)
  122.   #OF('GROUP')
  123.   #OROF('BLOB')
  124.   #OROF('END')
  125.     #CYCLE
  126.   #ENDCASE
  127.   #IF(%FieldDimension1 <> '0')
  128.     #CYCLE
  129.   #ENDIF
  130.   #SET(%ValueConstruct,UPPER(EXTRACT(%FieldQuickOptions,'ORDER',1)))
  131.   #IF(%FieldType = 'MEMO')
  132.     #ADD(%FieldListID,%TextControlOffset + ITEMS(%FieldListID))
  133.   #ELSIF(%ValueConstruct = 'FIRST')
  134.     #ADD(%FieldListID,%TopControlOffset + ITEMS(%FieldListID))
  135.   #ELSIF(%ValueConstruct = 'LAST')
  136.     #ADD(%FieldListID,%BottomControlOffset + ITEMS(%FieldListID))
  137.   #ELSE
  138.     #ADD(%FieldListID,%MiddleControlOffset + ITEMS(%FieldListID))
  139.   #ENDIF
  140.   #SET(%FieldList,%Field)
  141.   #SET(%FieldListType,%FieldType)
  142.   #SET(%FieldListJustification,%FieldJustType)
  143.   #IF(%FieldJustIndent)
  144.     #SET(%FieldListJustification,%FieldListJustification & '(' & %FieldJustIndent & ')')
  145.   #ENDIF
  146.   #CASE(%FieldType)
  147.   #OF('MEMO')
  148.     #SET(%FieldListTab,%FieldID)
  149.   #ELSE
  150.     #SET(%FieldListTab,EXTRACT(%FieldQuickOptions,'TAB',1))
  151.     #IF(NOT %FieldListTab)
  152.       #SET(%FieldListTab,'General')
  153.     #ELSE
  154.       #SET(%FieldListTab,SUB(%FieldListTab,2,LEN(%FieldListTab)-2))
  155.     #ENDIF
  156.     #INSERT(%DeterminePictureLength,%FieldPicture)
  157.     #SET(%FieldListBrowseWidth,%ValueConstruct)
  158.     #IF(%FieldListBrowseWidth > %MaximumBrowseItemWidth)
  159.       #SET(%FieldListBrowseWidth,%MaximumBrowseItemWidth)
  160.     #ENDIF
  161.   #ENDCASE
  162.   #FIX(%FileListTab,%FieldListTab)
  163.   #IF(NOT %FileListTab)
  164.     #ADD(%FileListTab,%FieldListTab)
  165.   #ENDIF
  166.   #SET(%FileListDescription,QUOTE(%FileDescription))
  167.   #IF(EXTRACT(%FieldQuickOptions,'VERTICALSPACE'))
  168.     #SET(%FieldListVerticalSpace,%True)
  169.   #ENDIF
  170.   #IF(%FieldLookup)
  171.     #SET(%FieldListLookup,%FieldLookup)
  172.     #FIX(%Relation,%FieldListLookup)
  173.     #SET(%FieldListLookupKey,%RelationKey)
  174.     #FOR(%FileKeyField),WHERE(%FileKeyFieldLink AND %FileKeyField)
  175.       #SET(%FieldListLookupField,%FileKeyFieldLink)
  176.     #ENDFOR
  177.   #ENDIF
  178.   #SET(%FieldListHeader,%FieldHeader)
  179.   #SET(%FieldListPicture,%FieldPicture)
  180.   #SET(%FieldListPromptWidth,%DefaultPromptWidth)
  181.   #FOR(%FieldScreenControl)
  182.     #ADD(%FieldListControl,%FieldScreenControl)
  183.     #SET(%FieldListControlOrig,EXTRACT(%FieldScreenControl,'USE',1))
  184.     #ADD(%FieldListLinkList,%FieldListControlOrig)
  185.     #SET(%FieldListControlWidth,%DefaultControlWidth)
  186.     #SET(%FieldListControlHeight,%DefaultControlHeight)
  187.     #SET(%QControlType,SUB(%FieldScreenControl,1,4))
  188.     #CASE(%QControlType)
  189.     #OF('PROM')
  190.       #SET(%FieldListControlType,'PROMPT')
  191.       #SET(%QControlText,EXTRACT(%FieldScreenControl,'PROMPT',1))
  192.       #IF(NOT %QControlText)
  193.         #FREE(%FieldListControl)
  194.         #CYCLE
  195.       #ENDIF
  196.       #SET(%FieldListPromptWidth,(LEN(%QControlText) - 2) * 4)
  197.       #IF(%FieldListPromptWidth > %FileListPromptWidth)
  198.         #SET(%FileListPromptWidth,%FieldListPromptWidth)
  199.       #ENDIF
  200.       #SET(%FileListTabHasPrompts,%True)
  201.     #OF('ENTR')
  202.       #SET(%FieldListControlType,'ENTRY')
  203.       #SET(%QControlText,EXTRACT(%FieldScreenControl,'ENTRY',1))
  204.       #INSERT(%DeterminePictureLength,%QControlText)
  205.       #SET(%FieldListControlWidth,%ValueConstruct)
  206.     #OF('STRI')
  207.       #SET(%FieldListControlType,'STRING')
  208.       #SET(%QControlText,EXTRACT(%FieldScreenControl,'STRING',1))
  209.       #IF(SUB(%QControlText,1,1)<>'@')
  210.         #SET(%FieldListControlWidth,(LEN(%QControlText)-2) * 4)
  211.       #ELSE
  212.         #INSERT(%DeterminePictureLength,%QControlText)
  213.         #SET(%FieldListControlWidth,%ValueConstruct)
  214.       #ENDIF
  215.     #OF('OPTI')
  216.       #SET(%FieldListControlType,'OPTION')
  217.       #SET(%FieldListRequiresEnd,%True)
  218.       #SET(%FieldListTotalWidth,EXTRACT(%FieldScreenControl,'AT',3))
  219.       #SET(%FieldListTotalHeight,EXTRACT(%FieldScreenControl,'AT',4))
  220.       #SET(%FieldListControlWidth,%FieldListTotalWidth)
  221.       #SET(%FieldListControlHeight,%FieldListTotalHeight)
  222.       #SET(%MaximumRadioRows,(%FieldListTotalHeight / 12) - 1)
  223.       #SET(%CurrentRadioX,%DefaultRadioXOffset)
  224.       #SET(%CurrentRadioY,%RadioInitialYOffset)
  225.       #SET(%CurrentRadioRow,1)
  226.     #OF('RADI')
  227.       #SET(%FieldListControlType,'RADIO')
  228.       #SET(%FieldListControlXOffset,%CurrentRadioX)
  229.       #SET(%FieldListControlYOffset,%CurrentRadioY)
  230.       #SET(%FieldListControlHeight,%DefaultRadioHeight)
  231.       #SET(%FieldListControlWidth,%DefaultRadioWidth)
  232.       #SET(%CurrentRadioRow,%CurrentRadioRow + 1)
  233.       #IF(%CurrentRadioRow > %MaximumRadioRows)
  234.         #SET(%CurrentRadioRow,1)
  235.         #SET(%CurrentRadioX,%CurrentRadioX + %DefaultRadioWidth + %DefaultRadioXOffset)
  236.         #SET(%CurrentRadioY,%RadioInitialYOffset)
  237.       #ELSE
  238.         #SET(%CurrentRadioY,%CurrentRadioY + %DefaultRadioHeight + %DefaultRadioYOffset)
  239.       #ENDIF
  240.     #OF('SPIN')
  241.       #SET(%FieldListControlType,'SPIN')
  242.       #SET(%QControlText,EXTRACT(%FieldScreenControl,'SPIN',1))
  243.       #INSERT(%DeterminePictureLength,%QControlText)
  244.       #SET(%FieldListControlWidth,%ValueConstruct + %DefaultSpinWidthOffset)
  245.     #OF('CHEC')
  246.       #SET(%FieldListControlType,'CHECK')
  247.       #SET(%FieldListControlHeight,%DefaultCheckHeight)
  248.       #SET(%QControlText,EXTRACT(%FieldScreenControl,'CHECK',1))
  249.       #SET(%FieldListControlWidth,((LEN(%QControlText) - 2) * 4) + %DefaultCheckBoxXOffset)
  250.       #IF(%FieldListControlWidth < %CheckColumnWidth)
  251.         #SET(%FieldListControlWidth,%CheckColumnWidth)
  252.       #ENDIF
  253.     #OF('LIST')
  254.       #SET(%FieldListControlType,'LIST')
  255.       #IF(EXTRACT(%FieldScreenControl,'DROP'))
  256.         #SET(%FieldListControlHeight,%DefaultControlHeight)
  257.       #ELSE
  258.         #SET(%FieldListControlHeight,ITEMS(%FieldChoices) * %DefaultListItemHeight)
  259.       #ENDIF
  260.       #SET(%FieldListControlWidth,100)
  261.     #OF('TEXT')
  262.       #SET(%ValueConstruct,%FieldScreenControl & ',VSCROLL')
  263.       #SET(%FieldListControlType,'TEXT')
  264.       #SET(%FieldListControlOrig,EXTRACT(%FieldScreenControl,'USE',1))
  265.       #SET(%FieldListControlXOffset,0)
  266.       #SET(%FieldListControlYOffset,0)
  267.       #IF(%FieldType = 'MEMO')
  268.         #SET(%FieldListControlHeight,'FULL')
  269.       #ELSE
  270.         #SET(%FieldListControlHeight,%DefaultControlHeight * 3)
  271.       #ENDIF
  272.       #SET(%FieldListControlWidth,'FULL')
  273.     #ENDCASE
  274.   #ENDFOR
  275.   #FOR(%FieldReportControl)
  276.     #SET(%QControlType,SUB(%FieldReportControl,1,4))
  277.     #CASE(%QControlType)
  278.     #OF('TEXT')
  279.       #ADD(%FieldListReportControl,%FieldReportControl)
  280.       #SET(%FieldListReportControlType,'TEXT')
  281.     #OF('CHEC')
  282.       #ADD(%FieldListReportControl,%FieldReportControl)
  283.       #SET(%FieldListReportControlType,'CHECK')
  284.     #OF('STRI')
  285.       #ADD(%FieldListReportControl,%FieldReportControl)
  286.       #SET(%FieldListReportControlType,'STRING')
  287.     #ELSE
  288.       #SET(%ValueConstruct,'STRING(' & %FieldPicture & '),USE(' & %Field & ')')
  289.       #ADD(%FieldListReportControl,%ValueConstruct)
  290.       #SET(%FieldListReportControlType,'STRING')
  291.     #ENDCASE
  292.     #BREAK
  293.   #ENDFOR
  294. #ENDFOR
  295. #FOR(%Key),WHERE(%KeyIndex <> 'DYNAMIC')
  296.   #MESSAGE('Collecting Key Information: ' & %Key,3)
  297.   #SET(%ValueConstruct,UPPER(EXTRACT(%KeyQuickOptions,'ORDER',1)))
  298.   #IF(%ValueConstruct = 'FIRST')
  299.     #ADD(%KeyListID,%TopControlOffset + ITEMS(%KeyListID))
  300.   #ELSIF(%ValueConstruct = 'LAST')
  301.     #ADD(%KeyListID,%BottomControlOffset + ITEMS(%KeyListID))
  302.   #ELSE
  303.     #ADD(%KeyListID,%MiddleControlOffset + ITEMS(%KeyListID))
  304.   #ENDIF
  305.   #SET(%KeyList,%Key)
  306.   #SET(%KeyListDescription,QUOTE(%KeyDescription))
  307.   #IF(EXTRACT(%KeyQuickOptions,'TAB',1))
  308.     #SET(%KeyListTab,EXTRACT(%KeyQuickOptions,'TAB',1))
  309.     #SET(%KeyListTab,SUB(%KeyListTab,2,LEN(%KeyListTab)-2))
  310.   #ELSIF(%KeyDescription)
  311.     #SET(%KeyListTab,QUOTE(%KeyDescription))
  312.   #ELSE
  313.     #SET(%KeyListTab,%Key)
  314.   #ENDIF
  315.   #SET(%KeyListNoPopulate,EXTRACT(%KeyQuickOptions,'NOPOPULATE'))
  316.   #FOR(%FieldListID)
  317.     #FIX(%KeyField,%FieldList)
  318.     #IF(%KeyField)
  319.       #ADD(%KeyListField,%KeyField)
  320.     #ENDIF
  321.   #ENDFOR
  322. #ENDFOR
  323. #FOR(%FileListTab)
  324.   #SET(%LastControlCheckColumn,%Null)
  325.   #IF(%FileListTabHasPrompts)
  326.     #SET(%MaximumCheckColumns,3)
  327.   #ELSE
  328.     #SET(%MaximumCheckColumns,4)
  329.   #ENDIF
  330.   #SET(%CheckColumnsPossible,%False)
  331.   #FOR(%FieldListID),WHERE(%FieldListTab = %FileListTab)
  332.     #FOR(%FieldListControl)
  333.       #IF(ITEMS(%FieldListLinkList) > 1)
  334.         #IF(INSTANCE(%FieldListControl) = 1)
  335.           #SELECT(%FieldListLinkList,ITEMS(%FieldListControl))
  336.         #ELSE
  337.           #SELECT(%FieldListLinkList,INSTANCE(%FieldListControl) - 1)
  338.         #ENDIF
  339.         #SET(%FieldListControlLink,%FieldListLinkList)
  340.       #ENDIF
  341.       #CASE(%FieldListControlType)
  342.       #OF('PROMPT')
  343.         #SET(%FieldListControlHeight,-1)
  344.         #SET(%FieldListControlWidth,%FileListPromptWidth)
  345.         #SET(%FieldListControlXOffset,%DefaultXOffset)
  346.       #ELSE
  347.         #IF(%FileListTabHasPrompts)
  348.           #SET(%FieldListControlXOffset,%FieldListControlXOffset + %FileListPromptWidth + %DefaultXOffset)
  349.         #ELSE
  350.           #SET(%FieldListControlXOffset,%DefaultXOffset)
  351.         #ENDIF
  352.         #IF(%FieldListControlWidth <> 'FULL')
  353.           #IF(%FieldListTotalWidth < (%FieldListControlXOffset + %FieldListControlWidth))
  354.             #SET(%FieldListTotalWidth,(%FieldListControlXOffset + %FieldListControlWidth))
  355.           #ENDIF
  356.         #ENDIF
  357.         #IF(%FileListControlsWidth < %FieldListTotalWidth)
  358.           #SET(%FileListControlsWidth,%FieldListTotalWidth)
  359.         #ENDIF
  360.         #IF(%FieldListTotalHeight = 0)
  361.           #SET(%FieldListTotalHeight,%FieldListControlHeight)
  362.         #ENDIF
  363.       #ENDCASE
  364.       #IF(%FieldListControlType = 'CHECK')
  365.         #IF(%FieldListVerticalSpace)
  366.           #SET(%FieldListControlHeight,-1)
  367.           #SET(%FieldListCheckColumn,0)
  368.         #ELSE
  369.           #IF(%CheckColumnsPossible)
  370.             #SET(%FieldListCheckColumn,%LastControlCheckColumn + 1)
  371.             #IF(%FieldListCheckColumn = %MaximumCheckColumns)
  372.               #SET(%FieldListCheckColumn,0)
  373.             #ENDIF
  374.           #ELSE
  375.             #SET(%FieldListCheckColumn,0)
  376.           #ENDIF
  377.         #ENDIF
  378.         #IF(%FieldListControlWidth <= %CheckColumnWidth)
  379.           #SET(%CheckColumnsPossible,%True)
  380.         #ELSE
  381.           #SET(%CheckColumnsPossible,%False)
  382.         #ENDIF
  383.       #ELSE
  384.         #IF(%FieldListControlType = 'RADIO')
  385.           #SET(%FieldListControlHeight,-1)
  386.         #ENDIF
  387.         #SET(%FieldListCheckColumn,0)
  388.         #SET(%CheckColumnsPossible,%False)
  389.       #ENDIF
  390.       #IF(%FieldListCheckColumn)
  391.         #SET(%FieldListControlXOffset,%FieldListControlXOffset + (%FieldListCheckColumn * (%DefaultXOffset + %CheckColumnWidth)))
  392.       #ENDIF
  393.       #SET(%LastControlCheckColumn,%FieldListCheckColumn)
  394.     #ENDFOR
  395.   #ENDFOR
  396. #ENDFOR
  397. #!--------------------------------------------------------------------------
  398. #GROUP(%DeterminePictureLength,%TestPicture)
  399. #CASE(UPPER(SUB(%TestPicture,2,1)))
  400. #OF('S')
  401.   #SET(%ValueConstruct,(SUB(%TestPicture,3,LEN(%TestPicture)-2))*4)
  402. #OF('N')
  403.   #IF(INSTRING('.',%TestPicture,1,1))
  404.     #SET(%ValueConstruct,(SUB(%TestPicture,3,(INSTRING('.',%TestPicture,1,1))-3)))
  405.   #ELSE
  406.     #SET(%ValueConstruct,(SUB(%TestPicture,3,LEN(%TestPicture)-2)))
  407.   #ENDIF
  408.   #IF(NUMERIC(%ValueConstruct))
  409.     #IF(%ValueConstruct< 0)
  410.       #SET(%ValueConstruct,(%ValueConstruct - 1) * -4)
  411.     #ELSE
  412.       #SET(%ValueConstruct,%ValueConstruct * 4)
  413.     #ENDIF
  414.   #ELSE
  415.     #SET(%ValueConstruct,%DefaultControlWidth)
  416.   #ENDIF
  417. #OF('P')
  418.   #SET(%ValueConstruct,(LEN(%TestPicture)-2)*4)
  419. #ELSE
  420.   #SET(%ValueConstruct,%DefaultControlWidth)
  421. #ENDCASE
  422. #!--------------------------------------------------------------------------
  423. #GROUP(%PopulateDictionaryControl,%LeftOffset,%TopOffset,%RightLimit,%BottomLimit)
  424. #DECLARE(%ConstructedControl)
  425. #DECLARE(%ConstructedX)
  426. #DECLARE(%ConstructedY)
  427. #FOR(%FieldListControl)
  428.   #IF(%FieldListControlXOffset <> %DefaultXOffset)
  429.     #SET(%ConstructedX,%LeftOffset + %FieldListControlXOffset)
  430.   #ELSE
  431.     #SET(%ConstructedX,%LeftOffset)
  432.   #ENDIF
  433.   #SET(%ConstructedY,%TopOffset + %FieldListControlYOffset)
  434.   #IF(%FieldListControlWidth = 'FULL')
  435.     #SET(%FieldListControlWidth,%RightLimit - %ConstructedX)
  436.   #ENDIF
  437.   #IF(%FieldListControlWidth < %MinimumControlWidth)
  438.     #SET(%FieldListControlWidth,%MinimumControlWidth)
  439.   #ENDIF
  440.   #IF(%ConstructedX + %FieldListControlWidth > %RightLimit)
  441.     #SET(%FieldListControlWidth,%RightLimit - %ConstructedX)
  442.   #ENDIF
  443.   #IF(%FieldListControlHeight = 'FULL')
  444.     #SET(%FieldListControlHeight,%BottomLimit - %TopOffset)
  445.   #ENDIF
  446.   #IF(%FieldListControlHeight <> '-1')
  447.     #SET(%ConstructedControl,',AT(' & %ConstructedX & ',' & %ConstructedY & ',' & %FieldListControlWidth & ',' & %FieldListControlHeight & ')')
  448.   #ELSE
  449.     #SET(%ConstructedControl,',AT(' & %ConstructedX & ',' & %ConstructedY & ')')
  450.   #ENDIF
  451.   #IF(%FieldListControlType = 'OPTION')
  452.     #SET(%ConstructedControl,%ConstructedControl & ',BOXED')
  453.   #ENDIF
  454.   #SET(%ConstructedControl,%ConstructedControl & ',#ORIG(' & %FieldListControlOrig & ')')
  455.   #IF(%FieldListControlLink)
  456.     #SET(%ConstructedControl,%ConstructedControl & ',#LINK(' & %FieldListControlLink & ')')
  457.   #ENDIF
  458.   #IF(EXTRACT(%FieldListControl,'AT'))
  459.     #SET(%ValueConstruct,SUB(%FieldListControl,1,INSTRING(',AT(',%FieldListControl,1,1) - 1))
  460.     #SET(%ValueConstruct,%ValueConstruct & SUB(%FieldListControl,INSTRING(',USE(',%FieldListControl,1,1),LEN(%FieldListControl)))
  461.   #ELSE
  462.     #SET(%ValueConstruct,%FieldListControl)
  463.   #ENDIF
  464.   #SET(%ConstructedControl,%ValueConstruct & %ConstructedControl)
  465.   %ConstructedControl
  466. #ENDFOR
  467. #IF(%FieldListRequiresEnd)
  468. END
  469. #ENDIF
  470.